# WidgetDef

ModelName: SRH-2D
WidgetName:
Sediment Size Class Cutoff (note: the size class is the table number minus 1 for the threshold particle size)_32


# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 6;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 14;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 26;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 28;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 30;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 32;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 34;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 36;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 38;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 40;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 42;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 44;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 46;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 48;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 50;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 52;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 54;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 56;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 58;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18) END FROM WidgetInst WHERE WidgetInstId = 18) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 60;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 20) END FROM WidgetInst WHERE WidgetInstId = 20) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 62;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 64;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 66;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 68;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 70;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 72;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 74;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 76;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 78;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 80;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 82;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 13) END FROM WidgetInst WHERE WidgetInstId = 13) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 84;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 97) END FROM WidgetInst WHERE WidgetInstId = 97) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 98;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 107) END FROM WidgetInst WHERE WidgetInstId = 107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 110) END FROM WidgetInst WHERE WidgetInstId = 110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 115) END FROM WidgetInst WHERE WidgetInstId = 115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 115) END FROM WidgetInst WHERE WidgetInstId = 115) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 107) END FROM WidgetInst WHERE WidgetInstId = 107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 133;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 147;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 147;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 147;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 147;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 147;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 150) END FROM WidgetInst WHERE WidgetInstId = 150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 167) END FROM WidgetInst WHERE WidgetInstId = 167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 167) END FROM WidgetInst WHERE WidgetInstId = 167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 176) END FROM WidgetInst WHERE WidgetInstId = 176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 176) END FROM WidgetInst WHERE WidgetInstId = 176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 176) END FROM WidgetInst WHERE WidgetInstId = 176) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 188) END FROM WidgetInst WHERE WidgetInstId = 188)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 188) END FROM WidgetInst WHERE WidgetInstId = 188)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 206) END FROM WidgetInst WHERE WidgetInstId = 206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 206) END FROM WidgetInst WHERE WidgetInstId = 206) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 190) END FROM WidgetInst WHERE WidgetInstId = 190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 251) END FROM WidgetInst WHERE WidgetInstId = 251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 251) END FROM WidgetInst WHERE WidgetInstId = 251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 251) END FROM WidgetInst WHERE WidgetInstId = 251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 267) END FROM WidgetInst WHERE WidgetInstId = 267) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 267) END FROM WidgetInst WHERE WidgetInstId = 267) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 267) END FROM WidgetInst WHERE WidgetInstId = 267) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 287) END FROM WidgetInst WHERE WidgetInstId = 287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 287) END FROM WidgetInst WHERE WidgetInstId = 287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 287) END FROM WidgetInst WHERE WidgetInstId = 287) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 307) END FROM WidgetInst WHERE WidgetInstId = 307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 307) END FROM WidgetInst WHERE WidgetInstId = 307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 307) END FROM WidgetInst WHERE WidgetInstId = 307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 313) END FROM WidgetInst WHERE WidgetInstId = 313) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 307) END FROM WidgetInst WHERE WidgetInstId = 307)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 313) END FROM WidgetInst WHERE WidgetInstId = 313) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 307) END FROM WidgetInst WHERE WidgetInstId = 307)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 313) END FROM WidgetInst WHERE WidgetInstId = 313) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 307) END FROM WidgetInst WHERE WidgetInstId = 307)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 322) END FROM WidgetInst WHERE WidgetInstId = 322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 322) END FROM WidgetInst WHERE WidgetInstId = 322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 322) END FROM WidgetInst WHERE WidgetInstId = 322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 322) END FROM WidgetInst WHERE WidgetInstId = 322) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 346) END FROM WidgetInst WHERE WidgetInstId = 346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 346) END FROM WidgetInst WHERE WidgetInstId = 346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 346) END FROM WidgetInst WHERE WidgetInstId = 346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 346) END FROM WidgetInst WHERE WidgetInstId = 346) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 368) END FROM WidgetInst WHERE WidgetInstId = 368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 368) END FROM WidgetInst WHERE WidgetInstId = 368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 368) END FROM WidgetInst WHERE WidgetInstId = 368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 368) END FROM WidgetInst WHERE WidgetInstId = 368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 368) END FROM WidgetInst WHERE WidgetInstId = 368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 368) END FROM WidgetInst WHERE WidgetInstId = 368) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 383) END FROM WidgetInst WHERE WidgetInstId = 383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 384;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 398;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 399;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 400;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 400;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 400;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 400;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 400;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 413) END FROM WidgetInst WHERE WidgetInstId = 413) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 414) END FROM WidgetInst WHERE WidgetInstId = 414) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 415) END FROM WidgetInst WHERE WidgetInstId = 415) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 498) END FROM WidgetInst WHERE WidgetInstId = 498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 499) END FROM WidgetInst WHERE WidgetInstId = 499) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 500) END FROM WidgetInst WHERE WidgetInstId = 500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 498) END FROM WidgetInst WHERE WidgetInstId = 498) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 499) END FROM WidgetInst WHERE WidgetInstId = 499) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 500) END FROM WidgetInst WHERE WidgetInstId = 500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 543) END FROM WidgetInst WHERE WidgetInstId = 543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 544) END FROM WidgetInst WHERE WidgetInstId = 544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 545) END FROM WidgetInst WHERE WidgetInstId = 545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 543) END FROM WidgetInst WHERE WidgetInstId = 543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 544) END FROM WidgetInst WHERE WidgetInstId = 544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 545) END FROM WidgetInst WHERE WidgetInstId = 545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 543) END FROM WidgetInst WHERE WidgetInstId = 543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 544) END FROM WidgetInst WHERE WidgetInstId = 544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 545) END FROM WidgetInst WHERE WidgetInstId = 545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 603) END FROM WidgetInst WHERE WidgetInstId = 603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 604) END FROM WidgetInst WHERE WidgetInstId = 604)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 605) END FROM WidgetInst WHERE WidgetInstId = 605)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 603) END FROM WidgetInst WHERE WidgetInstId = 603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 604) END FROM WidgetInst WHERE WidgetInstId = 604)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 605) END FROM WidgetInst WHERE WidgetInstId = 605)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 693) END FROM WidgetInst WHERE WidgetInstId = 693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 694) END FROM WidgetInst WHERE WidgetInstId = 694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 695) END FROM WidgetInst WHERE WidgetInstId = 695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 693) END FROM WidgetInst WHERE WidgetInstId = 693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 694) END FROM WidgetInst WHERE WidgetInstId = 694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 695) END FROM WidgetInst WHERE WidgetInstId = 695) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 613) END FROM WidgetInst WHERE WidgetInstId = 613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 614) END FROM WidgetInst WHERE WidgetInstId = 614) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 615) END FROM WidgetInst WHERE WidgetInstId = 615) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 918) END FROM WidgetInst WHERE WidgetInstId = 918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 919) END FROM WidgetInst WHERE WidgetInstId = 919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 920) END FROM WidgetInst WHERE WidgetInstId = 920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 918) END FROM WidgetInst WHERE WidgetInstId = 918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 919) END FROM WidgetInst WHERE WidgetInstId = 919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 920) END FROM WidgetInst WHERE WidgetInstId = 920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 918) END FROM WidgetInst WHERE WidgetInstId = 918) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 919) END FROM WidgetInst WHERE WidgetInstId = 919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 920) END FROM WidgetInst WHERE WidgetInstId = 920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 999) END FROM WidgetInst WHERE WidgetInstId = 999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1000) END FROM WidgetInst WHERE WidgetInstId = 1000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 999) END FROM WidgetInst WHERE WidgetInstId = 999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1000) END FROM WidgetInst WHERE WidgetInstId = 1000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 998) END FROM WidgetInst WHERE WidgetInstId = 998) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 999) END FROM WidgetInst WHERE WidgetInstId = 999) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1000) END FROM WidgetInst WHERE WidgetInstId = 1000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1098) END FROM WidgetInst WHERE WidgetInstId = 1098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1099) END FROM WidgetInst WHERE WidgetInstId = 1099) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1100) END FROM WidgetInst WHERE WidgetInstId = 1100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1098) END FROM WidgetInst WHERE WidgetInstId = 1098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1099) END FROM WidgetInst WHERE WidgetInstId = 1099) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1100) END FROM WidgetInst WHERE WidgetInstId = 1100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1098) END FROM WidgetInst WHERE WidgetInstId = 1098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1099) END FROM WidgetInst WHERE WidgetInstId = 1099) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1100) END FROM WidgetInst WHERE WidgetInstId = 1100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1198) END FROM WidgetInst WHERE WidgetInstId = 1198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1200) END FROM WidgetInst WHERE WidgetInstId = 1200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1198) END FROM WidgetInst WHERE WidgetInstId = 1198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1200) END FROM WidgetInst WHERE WidgetInstId = 1200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1198) END FROM WidgetInst WHERE WidgetInstId = 1198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1200) END FROM WidgetInst WHERE WidgetInstId = 1200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1228) END FROM WidgetInst WHERE WidgetInstId = 1228) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1198) END FROM WidgetInst WHERE WidgetInstId = 1198)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1229) END FROM WidgetInst WHERE WidgetInstId = 1229) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1230) END FROM WidgetInst WHERE WidgetInstId = 1230) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1200) END FROM WidgetInst WHERE WidgetInstId = 1200)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1228) END FROM WidgetInst WHERE WidgetInstId = 1228) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1198) END FROM WidgetInst WHERE WidgetInstId = 1198)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1229) END FROM WidgetInst WHERE WidgetInstId = 1229) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1230) END FROM WidgetInst WHERE WidgetInstId = 1230) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1200) END FROM WidgetInst WHERE WidgetInstId = 1200)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1228) END FROM WidgetInst WHERE WidgetInstId = 1228) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1198) END FROM WidgetInst WHERE WidgetInstId = 1198)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1229) END FROM WidgetInst WHERE WidgetInstId = 1229) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1199) END FROM WidgetInst WHERE WidgetInstId = 1199)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1230) END FROM WidgetInst WHERE WidgetInstId = 1230) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1200) END FROM WidgetInst WHERE WidgetInstId = 1200)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1273) END FROM WidgetInst WHERE WidgetInstId = 1273) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1274) END FROM WidgetInst WHERE WidgetInstId = 1274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1275) END FROM WidgetInst WHERE WidgetInstId = 1275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1273) END FROM WidgetInst WHERE WidgetInstId = 1273) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1274) END FROM WidgetInst WHERE WidgetInstId = 1274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1275) END FROM WidgetInst WHERE WidgetInstId = 1275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1273) END FROM WidgetInst WHERE WidgetInstId = 1273) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1274) END FROM WidgetInst WHERE WidgetInstId = 1274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1275) END FROM WidgetInst WHERE WidgetInstId = 1275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1273) END FROM WidgetInst WHERE WidgetInstId = 1273) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1274) END FROM WidgetInst WHERE WidgetInstId = 1274) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1275) END FROM WidgetInst WHERE WidgetInstId = 1275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1393) END FROM WidgetInst WHERE WidgetInstId = 1393) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1483;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1394) END FROM WidgetInst WHERE WidgetInstId = 1394) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1395) END FROM WidgetInst WHERE WidgetInstId = 1395) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 1503) END FROM WidgetInst WHERE WidgetInstId = 1503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 1504) END FROM WidgetInst WHERE WidgetInstId = 1504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 1505) END FROM WidgetInst WHERE WidgetInstId = 1505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1503) END FROM WidgetInst WHERE WidgetInstId = 1503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1504) END FROM WidgetInst WHERE WidgetInstId = 1504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1505) END FROM WidgetInst WHERE WidgetInstId = 1505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1503) END FROM WidgetInst WHERE WidgetInstId = 1503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1504) END FROM WidgetInst WHERE WidgetInstId = 1504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1505) END FROM WidgetInst WHERE WidgetInstId = 1505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1503) END FROM WidgetInst WHERE WidgetInstId = 1503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1504) END FROM WidgetInst WHERE WidgetInstId = 1504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1505) END FROM WidgetInst WHERE WidgetInstId = 1505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1503) END FROM WidgetInst WHERE WidgetInstId = 1503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1504) END FROM WidgetInst WHERE WidgetInstId = 1504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1505) END FROM WidgetInst WHERE WidgetInstId = 1505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1503) END FROM WidgetInst WHERE WidgetInstId = 1503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1504) END FROM WidgetInst WHERE WidgetInstId = 1504) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1505) END FROM WidgetInst WHERE WidgetInstId = 1505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 398) END FROM WidgetInst WHERE WidgetInstId = 398) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 399) END FROM WidgetInst WHERE WidgetInstId = 399) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 400) END FROM WidgetInst WHERE WidgetInstId = 400) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 1578) END FROM WidgetInst WHERE WidgetInstId = 1578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 1579) END FROM WidgetInst WHERE WidgetInstId = 1579) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 1580) END FROM WidgetInst WHERE WidgetInstId = 1580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1585;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 1593;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 1593;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 1593;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 1593;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 1593;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 24)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 1593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1596) END FROM WidgetInst WHERE WidgetInstId = 1596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1613) END FROM WidgetInst WHERE WidgetInstId = 1613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1613) END FROM WidgetInst WHERE WidgetInstId = 1613) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1622) END FROM WidgetInst WHERE WidgetInstId = 1622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1622) END FROM WidgetInst WHERE WidgetInstId = 1622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1622) END FROM WidgetInst WHERE WidgetInstId = 1622) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1634) END FROM WidgetInst WHERE WidgetInstId = 1634)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1634) END FROM WidgetInst WHERE WidgetInstId = 1634)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 1652) END FROM WidgetInst WHERE WidgetInstId = 1652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 1636) END FROM WidgetInst WHERE WidgetInstId = 1636) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1697) END FROM WidgetInst WHERE WidgetInstId = 1697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1697) END FROM WidgetInst WHERE WidgetInstId = 1697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1697) END FROM WidgetInst WHERE WidgetInstId = 1697) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1713) END FROM WidgetInst WHERE WidgetInstId = 1713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1713) END FROM WidgetInst WHERE WidgetInstId = 1713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1713) END FROM WidgetInst WHERE WidgetInstId = 1713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1733) END FROM WidgetInst WHERE WidgetInstId = 1733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1733) END FROM WidgetInst WHERE WidgetInstId = 1733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1733) END FROM WidgetInst WHERE WidgetInstId = 1733) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1753) END FROM WidgetInst WHERE WidgetInstId = 1753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1753) END FROM WidgetInst WHERE WidgetInstId = 1753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1753) END FROM WidgetInst WHERE WidgetInstId = 1753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1759) END FROM WidgetInst WHERE WidgetInstId = 1759) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1753) END FROM WidgetInst WHERE WidgetInstId = 1753)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1759) END FROM WidgetInst WHERE WidgetInstId = 1759) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1753) END FROM WidgetInst WHERE WidgetInstId = 1753)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 1759) END FROM WidgetInst WHERE WidgetInstId = 1759) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 1753) END FROM WidgetInst WHERE WidgetInstId = 1753)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1768) END FROM WidgetInst WHERE WidgetInstId = 1768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1768) END FROM WidgetInst WHERE WidgetInstId = 1768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1768) END FROM WidgetInst WHERE WidgetInstId = 1768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1768) END FROM WidgetInst WHERE WidgetInstId = 1768) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 1792) END FROM WidgetInst WHERE WidgetInstId = 1792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 1792) END FROM WidgetInst WHERE WidgetInstId = 1792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 1792) END FROM WidgetInst WHERE WidgetInstId = 1792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 1792) END FROM WidgetInst WHERE WidgetInstId = 1792) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 1814) END FROM WidgetInst WHERE WidgetInstId = 1814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1814) END FROM WidgetInst WHERE WidgetInstId = 1814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1814) END FROM WidgetInst WHERE WidgetInstId = 1814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1814) END FROM WidgetInst WHERE WidgetInstId = 1814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1814) END FROM WidgetInst WHERE WidgetInstId = 1814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 1814) END FROM WidgetInst WHERE WidgetInstId = 1814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 1593) END FROM WidgetInst WHERE WidgetInstId = 1593) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 1829) END FROM WidgetInst WHERE WidgetInstId = 1829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1909;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 1873) END FROM WidgetInst WHERE WidgetInstId = 1873) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1915;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 1875) END FROM WidgetInst WHERE WidgetInstId = 1875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 1868) END FROM WidgetInst WHERE WidgetInstId = 1868) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 1952) END FROM WidgetInst WHERE WidgetInstId = 1952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1962) END FROM WidgetInst WHERE WidgetInstId = 1962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 1965) END FROM WidgetInst WHERE WidgetInstId = 1965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 1970) END FROM WidgetInst WHERE WidgetInstId = 1970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 1970) END FROM WidgetInst WHERE WidgetInstId = 1970) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 1962) END FROM WidgetInst WHERE WidgetInstId = 1962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 1988;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2002;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2002;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2002;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2002;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2002;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2005) END FROM WidgetInst WHERE WidgetInstId = 2005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2022) END FROM WidgetInst WHERE WidgetInstId = 2022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2022) END FROM WidgetInst WHERE WidgetInstId = 2022) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2031) END FROM WidgetInst WHERE WidgetInstId = 2031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2031) END FROM WidgetInst WHERE WidgetInstId = 2031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2031) END FROM WidgetInst WHERE WidgetInstId = 2031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2043) END FROM WidgetInst WHERE WidgetInstId = 2043)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2050;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2043) END FROM WidgetInst WHERE WidgetInstId = 2043)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2061) END FROM WidgetInst WHERE WidgetInstId = 2061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2061) END FROM WidgetInst WHERE WidgetInstId = 2061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2045) END FROM WidgetInst WHERE WidgetInstId = 2045) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2106) END FROM WidgetInst WHERE WidgetInstId = 2106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2106) END FROM WidgetInst WHERE WidgetInstId = 2106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2106) END FROM WidgetInst WHERE WidgetInstId = 2106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2122) END FROM WidgetInst WHERE WidgetInstId = 2122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2122) END FROM WidgetInst WHERE WidgetInstId = 2122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2122) END FROM WidgetInst WHERE WidgetInstId = 2122) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2142) END FROM WidgetInst WHERE WidgetInstId = 2142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2142) END FROM WidgetInst WHERE WidgetInstId = 2142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2142) END FROM WidgetInst WHERE WidgetInstId = 2142) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2168) END FROM WidgetInst WHERE WidgetInstId = 2168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2168) END FROM WidgetInst WHERE WidgetInstId = 2168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2168) END FROM WidgetInst WHERE WidgetInstId = 2168) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 2162) END FROM WidgetInst WHERE WidgetInstId = 2162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2177) END FROM WidgetInst WHERE WidgetInstId = 2177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2177) END FROM WidgetInst WHERE WidgetInstId = 2177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2177) END FROM WidgetInst WHERE WidgetInstId = 2177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2177) END FROM WidgetInst WHERE WidgetInstId = 2177) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2002) END FROM WidgetInst WHERE WidgetInstId = 2002) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2201) END FROM WidgetInst WHERE WidgetInstId = 2201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2201) END FROM WidgetInst WHERE WidgetInstId = 2201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2201) END FROM WidgetInst WHERE WidgetInstId = 2201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 2201) END FROM WidgetInst WHERE WidgetInstId = 2201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 2223) END FROM WidgetInst WHERE WidgetInstId = 2223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2223) END FROM WidgetInst WHERE WidgetInstId = 2223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2223) END FROM WidgetInst WHERE WidgetInstId = 2223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2223) END FROM WidgetInst WHERE WidgetInstId = 2223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2223) END FROM WidgetInst WHERE WidgetInstId = 2223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 2223) END FROM WidgetInst WHERE WidgetInstId = 2223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 2238) END FROM WidgetInst WHERE WidgetInstId = 2238) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2239;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2251;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2251;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2251;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2251;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2251;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2251;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2252;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2252;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2252;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2252;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2252;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2252;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2253;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2253;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2253;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2253;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2253;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2253;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2254;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2254;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2254;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2254;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2254;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2254;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 2255;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 2255;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 2255;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 2255;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 2255;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 2255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2266) END FROM WidgetInst WHERE WidgetInstId = 2266) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2267) END FROM WidgetInst WHERE WidgetInstId = 2267) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2268) END FROM WidgetInst WHERE WidgetInstId = 2268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2269) END FROM WidgetInst WHERE WidgetInstId = 2269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 2270) END FROM WidgetInst WHERE WidgetInstId = 2270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2342;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2351) END FROM WidgetInst WHERE WidgetInstId = 2351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2352) END FROM WidgetInst WHERE WidgetInstId = 2352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2353) END FROM WidgetInst WHERE WidgetInstId = 2353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2354) END FROM WidgetInst WHERE WidgetInstId = 2354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2355) END FROM WidgetInst WHERE WidgetInstId = 2355) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2397) END FROM WidgetInst WHERE WidgetInstId = 2397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2398) END FROM WidgetInst WHERE WidgetInstId = 2398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2399) END FROM WidgetInst WHERE WidgetInstId = 2399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2400) END FROM WidgetInst WHERE WidgetInstId = 2400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2397) END FROM WidgetInst WHERE WidgetInstId = 2397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2398) END FROM WidgetInst WHERE WidgetInstId = 2398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2399) END FROM WidgetInst WHERE WidgetInstId = 2399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2400) END FROM WidgetInst WHERE WidgetInstId = 2400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2396) END FROM WidgetInst WHERE WidgetInstId = 2396) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2397) END FROM WidgetInst WHERE WidgetInstId = 2397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2398) END FROM WidgetInst WHERE WidgetInstId = 2398) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2399) END FROM WidgetInst WHERE WidgetInstId = 2399) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2400) END FROM WidgetInst WHERE WidgetInstId = 2400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2456) END FROM WidgetInst WHERE WidgetInstId = 2456)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2457) END FROM WidgetInst WHERE WidgetInstId = 2457)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2458) END FROM WidgetInst WHERE WidgetInstId = 2458)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2459) END FROM WidgetInst WHERE WidgetInstId = 2459)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 2460) END FROM WidgetInst WHERE WidgetInstId = 2460)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2456) END FROM WidgetInst WHERE WidgetInstId = 2456)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2457) END FROM WidgetInst WHERE WidgetInstId = 2457)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2458) END FROM WidgetInst WHERE WidgetInstId = 2458)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2459) END FROM WidgetInst WHERE WidgetInstId = 2459)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2460) END FROM WidgetInst WHERE WidgetInstId = 2460)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2546) END FROM WidgetInst WHERE WidgetInstId = 2546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2547) END FROM WidgetInst WHERE WidgetInstId = 2547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2548) END FROM WidgetInst WHERE WidgetInstId = 2548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2549) END FROM WidgetInst WHERE WidgetInstId = 2549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 2550) END FROM WidgetInst WHERE WidgetInstId = 2550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2546) END FROM WidgetInst WHERE WidgetInstId = 2546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2547) END FROM WidgetInst WHERE WidgetInstId = 2547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2548) END FROM WidgetInst WHERE WidgetInstId = 2548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2549) END FROM WidgetInst WHERE WidgetInstId = 2549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 2550) END FROM WidgetInst WHERE WidgetInstId = 2550) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2466) END FROM WidgetInst WHERE WidgetInstId = 2466) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2467) END FROM WidgetInst WHERE WidgetInstId = 2467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2468) END FROM WidgetInst WHERE WidgetInstId = 2468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2469) END FROM WidgetInst WHERE WidgetInstId = 2469) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 2470) END FROM WidgetInst WHERE WidgetInstId = 2470) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2771) END FROM WidgetInst WHERE WidgetInstId = 2771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2772) END FROM WidgetInst WHERE WidgetInstId = 2772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2773) END FROM WidgetInst WHERE WidgetInstId = 2773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2774) END FROM WidgetInst WHERE WidgetInstId = 2774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2775) END FROM WidgetInst WHERE WidgetInstId = 2775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2771) END FROM WidgetInst WHERE WidgetInstId = 2771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2772) END FROM WidgetInst WHERE WidgetInstId = 2772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2773) END FROM WidgetInst WHERE WidgetInstId = 2773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2774) END FROM WidgetInst WHERE WidgetInstId = 2774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2775) END FROM WidgetInst WHERE WidgetInstId = 2775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2771) END FROM WidgetInst WHERE WidgetInstId = 2771) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2772) END FROM WidgetInst WHERE WidgetInstId = 2772) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2773) END FROM WidgetInst WHERE WidgetInstId = 2773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2774) END FROM WidgetInst WHERE WidgetInstId = 2774) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2775) END FROM WidgetInst WHERE WidgetInstId = 2775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2851) END FROM WidgetInst WHERE WidgetInstId = 2851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2852) END FROM WidgetInst WHERE WidgetInstId = 2852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2853) END FROM WidgetInst WHERE WidgetInstId = 2853) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2854) END FROM WidgetInst WHERE WidgetInstId = 2854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2855) END FROM WidgetInst WHERE WidgetInstId = 2855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2851) END FROM WidgetInst WHERE WidgetInstId = 2851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2852) END FROM WidgetInst WHERE WidgetInstId = 2852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2853) END FROM WidgetInst WHERE WidgetInstId = 2853) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2854) END FROM WidgetInst WHERE WidgetInstId = 2854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2855) END FROM WidgetInst WHERE WidgetInstId = 2855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2851) END FROM WidgetInst WHERE WidgetInstId = 2851) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2852) END FROM WidgetInst WHERE WidgetInstId = 2852) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2853) END FROM WidgetInst WHERE WidgetInstId = 2853) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2854) END FROM WidgetInst WHERE WidgetInstId = 2854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2855) END FROM WidgetInst WHERE WidgetInstId = 2855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2888;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2951) END FROM WidgetInst WHERE WidgetInstId = 2951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2952) END FROM WidgetInst WHERE WidgetInstId = 2952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2953) END FROM WidgetInst WHERE WidgetInstId = 2953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2954) END FROM WidgetInst WHERE WidgetInstId = 2954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2955) END FROM WidgetInst WHERE WidgetInstId = 2955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2951) END FROM WidgetInst WHERE WidgetInstId = 2951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2952) END FROM WidgetInst WHERE WidgetInstId = 2952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2953) END FROM WidgetInst WHERE WidgetInstId = 2953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2968;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2954) END FROM WidgetInst WHERE WidgetInstId = 2954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2955) END FROM WidgetInst WHERE WidgetInstId = 2955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2951) END FROM WidgetInst WHERE WidgetInstId = 2951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2952) END FROM WidgetInst WHERE WidgetInstId = 2952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2953) END FROM WidgetInst WHERE WidgetInstId = 2953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2954) END FROM WidgetInst WHERE WidgetInstId = 2954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 2955) END FROM WidgetInst WHERE WidgetInstId = 2955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 2990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3051) END FROM WidgetInst WHERE WidgetInstId = 3051) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3052) END FROM WidgetInst WHERE WidgetInstId = 3052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3053) END FROM WidgetInst WHERE WidgetInstId = 3053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3054) END FROM WidgetInst WHERE WidgetInstId = 3054) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3055) END FROM WidgetInst WHERE WidgetInstId = 3055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3051) END FROM WidgetInst WHERE WidgetInstId = 3051) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3052) END FROM WidgetInst WHERE WidgetInstId = 3052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3053) END FROM WidgetInst WHERE WidgetInstId = 3053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3054) END FROM WidgetInst WHERE WidgetInstId = 3054) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3055) END FROM WidgetInst WHERE WidgetInstId = 3055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3051) END FROM WidgetInst WHERE WidgetInstId = 3051) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3052) END FROM WidgetInst WHERE WidgetInstId = 3052) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3053) END FROM WidgetInst WHERE WidgetInstId = 3053) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3054) END FROM WidgetInst WHERE WidgetInstId = 3054) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3055) END FROM WidgetInst WHERE WidgetInstId = 3055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3081) END FROM WidgetInst WHERE WidgetInstId = 3081) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3051) END FROM WidgetInst WHERE WidgetInstId = 3051)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3082) END FROM WidgetInst WHERE WidgetInstId = 3082) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3052) END FROM WidgetInst WHERE WidgetInstId = 3052)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3083) END FROM WidgetInst WHERE WidgetInstId = 3083) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3053) END FROM WidgetInst WHERE WidgetInstId = 3053)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3084) END FROM WidgetInst WHERE WidgetInstId = 3084) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3054) END FROM WidgetInst WHERE WidgetInstId = 3054)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3085) END FROM WidgetInst WHERE WidgetInstId = 3085) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3055) END FROM WidgetInst WHERE WidgetInstId = 3055)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3081) END FROM WidgetInst WHERE WidgetInstId = 3081) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3051) END FROM WidgetInst WHERE WidgetInstId = 3051)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3082) END FROM WidgetInst WHERE WidgetInstId = 3082) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3052) END FROM WidgetInst WHERE WidgetInstId = 3052)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3083) END FROM WidgetInst WHERE WidgetInstId = 3083) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3053) END FROM WidgetInst WHERE WidgetInstId = 3053)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3084) END FROM WidgetInst WHERE WidgetInstId = 3084) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3054) END FROM WidgetInst WHERE WidgetInstId = 3054)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3085) END FROM WidgetInst WHERE WidgetInstId = 3085) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3055) END FROM WidgetInst WHERE WidgetInstId = 3055)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3081) END FROM WidgetInst WHERE WidgetInstId = 3081) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3051) END FROM WidgetInst WHERE WidgetInstId = 3051)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3082) END FROM WidgetInst WHERE WidgetInstId = 3082) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3052) END FROM WidgetInst WHERE WidgetInstId = 3052)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3083) END FROM WidgetInst WHERE WidgetInstId = 3083) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3053) END FROM WidgetInst WHERE WidgetInstId = 3053)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3084) END FROM WidgetInst WHERE WidgetInstId = 3084) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3054) END FROM WidgetInst WHERE WidgetInstId = 3054)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3085) END FROM WidgetInst WHERE WidgetInstId = 3085) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3055) END FROM WidgetInst WHERE WidgetInstId = 3055)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3126) END FROM WidgetInst WHERE WidgetInstId = 3126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3127) END FROM WidgetInst WHERE WidgetInstId = 3127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3128) END FROM WidgetInst WHERE WidgetInstId = 3128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3129) END FROM WidgetInst WHERE WidgetInstId = 3129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3130) END FROM WidgetInst WHERE WidgetInstId = 3130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3126) END FROM WidgetInst WHERE WidgetInstId = 3126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3127) END FROM WidgetInst WHERE WidgetInstId = 3127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3128) END FROM WidgetInst WHERE WidgetInstId = 3128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3129) END FROM WidgetInst WHERE WidgetInstId = 3129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3130) END FROM WidgetInst WHERE WidgetInstId = 3130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3126) END FROM WidgetInst WHERE WidgetInstId = 3126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3127) END FROM WidgetInst WHERE WidgetInstId = 3127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3128) END FROM WidgetInst WHERE WidgetInstId = 3128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3129) END FROM WidgetInst WHERE WidgetInstId = 3129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3130) END FROM WidgetInst WHERE WidgetInstId = 3130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3126) END FROM WidgetInst WHERE WidgetInstId = 3126) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3127) END FROM WidgetInst WHERE WidgetInstId = 3127) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3128) END FROM WidgetInst WHERE WidgetInstId = 3128) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3129) END FROM WidgetInst WHERE WidgetInstId = 3129) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3130) END FROM WidgetInst WHERE WidgetInstId = 3130) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3246) END FROM WidgetInst WHERE WidgetInstId = 3246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3247) END FROM WidgetInst WHERE WidgetInstId = 3247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3248) END FROM WidgetInst WHERE WidgetInstId = 3248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3249) END FROM WidgetInst WHERE WidgetInstId = 3249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3250) END FROM WidgetInst WHERE WidgetInstId = 3250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3246) END FROM WidgetInst WHERE WidgetInstId = 3246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3247) END FROM WidgetInst WHERE WidgetInstId = 3247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3248) END FROM WidgetInst WHERE WidgetInstId = 3248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3249) END FROM WidgetInst WHERE WidgetInstId = 3249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3250) END FROM WidgetInst WHERE WidgetInstId = 3250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3246) END FROM WidgetInst WHERE WidgetInstId = 3246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3247) END FROM WidgetInst WHERE WidgetInstId = 3247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3248) END FROM WidgetInst WHERE WidgetInstId = 3248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3249) END FROM WidgetInst WHERE WidgetInstId = 3249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3250) END FROM WidgetInst WHERE WidgetInstId = 3250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3246) END FROM WidgetInst WHERE WidgetInstId = 3246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3247) END FROM WidgetInst WHERE WidgetInstId = 3247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3248) END FROM WidgetInst WHERE WidgetInstId = 3248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3249) END FROM WidgetInst WHERE WidgetInstId = 3249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3339;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3250) END FROM WidgetInst WHERE WidgetInstId = 3250) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3357) END FROM WidgetInst WHERE WidgetInstId = 3357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3358) END FROM WidgetInst WHERE WidgetInstId = 3358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3359) END FROM WidgetInst WHERE WidgetInstId = 3359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3360) END FROM WidgetInst WHERE WidgetInstId = 3360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3357) END FROM WidgetInst WHERE WidgetInstId = 3357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3358) END FROM WidgetInst WHERE WidgetInstId = 3358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3359) END FROM WidgetInst WHERE WidgetInstId = 3359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3360) END FROM WidgetInst WHERE WidgetInstId = 3360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3357) END FROM WidgetInst WHERE WidgetInstId = 3357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3358) END FROM WidgetInst WHERE WidgetInstId = 3358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3359) END FROM WidgetInst WHERE WidgetInstId = 3359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3360) END FROM WidgetInst WHERE WidgetInstId = 3360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3357) END FROM WidgetInst WHERE WidgetInstId = 3357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3358) END FROM WidgetInst WHERE WidgetInstId = 3358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3359) END FROM WidgetInst WHERE WidgetInstId = 3359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3360) END FROM WidgetInst WHERE WidgetInstId = 3360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3357) END FROM WidgetInst WHERE WidgetInstId = 3357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3358) END FROM WidgetInst WHERE WidgetInstId = 3358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3359) END FROM WidgetInst WHERE WidgetInstId = 3359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3360) END FROM WidgetInst WHERE WidgetInstId = 3360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3356) END FROM WidgetInst WHERE WidgetInstId = 3356) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3357) END FROM WidgetInst WHERE WidgetInstId = 3357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3358) END FROM WidgetInst WHERE WidgetInstId = 3358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3359) END FROM WidgetInst WHERE WidgetInstId = 3359) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3360) END FROM WidgetInst WHERE WidgetInstId = 3360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2251) END FROM WidgetInst WHERE WidgetInstId = 2251) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2252) END FROM WidgetInst WHERE WidgetInstId = 2252) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2253) END FROM WidgetInst WHERE WidgetInstId = 2253) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2254) END FROM WidgetInst WHERE WidgetInstId = 2254) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 2255) END FROM WidgetInst WHERE WidgetInstId = 2255) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3431) END FROM WidgetInst WHERE WidgetInstId = 3431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3432) END FROM WidgetInst WHERE WidgetInstId = 3432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3433) END FROM WidgetInst WHERE WidgetInstId = 3433) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3434) END FROM WidgetInst WHERE WidgetInstId = 3434) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3435) END FROM WidgetInst WHERE WidgetInstId = 3435) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3440;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 3448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 3448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 3448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 3448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 3448;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 3448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 3451) END FROM WidgetInst WHERE WidgetInstId = 3451) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 1857) END FROM WidgetInst WHERE WidgetInstId = 1857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3468) END FROM WidgetInst WHERE WidgetInstId = 3468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3468) END FROM WidgetInst WHERE WidgetInstId = 3468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3477) END FROM WidgetInst WHERE WidgetInstId = 3477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3477) END FROM WidgetInst WHERE WidgetInstId = 3477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3477) END FROM WidgetInst WHERE WidgetInstId = 3477) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3489) END FROM WidgetInst WHERE WidgetInstId = 3489)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3489) END FROM WidgetInst WHERE WidgetInstId = 3489)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3507) END FROM WidgetInst WHERE WidgetInstId = 3507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 3507) END FROM WidgetInst WHERE WidgetInstId = 3507) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 3491) END FROM WidgetInst WHERE WidgetInstId = 3491) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3552) END FROM WidgetInst WHERE WidgetInstId = 3552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3552) END FROM WidgetInst WHERE WidgetInstId = 3552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3552) END FROM WidgetInst WHERE WidgetInstId = 3552) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3568) END FROM WidgetInst WHERE WidgetInstId = 3568) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3568) END FROM WidgetInst WHERE WidgetInstId = 3568) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3568) END FROM WidgetInst WHERE WidgetInstId = 3568) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3588) END FROM WidgetInst WHERE WidgetInstId = 3588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3588) END FROM WidgetInst WHERE WidgetInstId = 3588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3588) END FROM WidgetInst WHERE WidgetInstId = 3588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3608) END FROM WidgetInst WHERE WidgetInstId = 3608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3608) END FROM WidgetInst WHERE WidgetInstId = 3608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3608) END FROM WidgetInst WHERE WidgetInstId = 3608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3614) END FROM WidgetInst WHERE WidgetInstId = 3614) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3608) END FROM WidgetInst WHERE WidgetInstId = 3608)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3614) END FROM WidgetInst WHERE WidgetInstId = 3614) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3608) END FROM WidgetInst WHERE WidgetInstId = 3608)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 3614) END FROM WidgetInst WHERE WidgetInstId = 3614) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 3608) END FROM WidgetInst WHERE WidgetInstId = 3608)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3623) END FROM WidgetInst WHERE WidgetInstId = 3623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3623) END FROM WidgetInst WHERE WidgetInstId = 3623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3623) END FROM WidgetInst WHERE WidgetInstId = 3623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3623) END FROM WidgetInst WHERE WidgetInstId = 3623) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 3647) END FROM WidgetInst WHERE WidgetInstId = 3647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 3669) END FROM WidgetInst WHERE WidgetInstId = 3669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3670;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3669) END FROM WidgetInst WHERE WidgetInstId = 3669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3669) END FROM WidgetInst WHERE WidgetInstId = 3669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3669) END FROM WidgetInst WHERE WidgetInstId = 3669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3669) END FROM WidgetInst WHERE WidgetInstId = 3669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 3669) END FROM WidgetInst WHERE WidgetInstId = 3669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 3448) END FROM WidgetInst WHERE WidgetInstId = 3448) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 1860) END FROM WidgetInst WHERE WidgetInstId = 1860)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 3684) END FROM WidgetInst WHERE WidgetInstId = 3684) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3712) END FROM WidgetInst WHERE WidgetInstId = 3712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3712) END FROM WidgetInst WHERE WidgetInstId = 3712) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3723) END FROM WidgetInst WHERE WidgetInstId = 3723) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3724) END FROM WidgetInst WHERE WidgetInstId = 3724) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3725) END FROM WidgetInst WHERE WidgetInstId = 3725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3726) END FROM WidgetInst WHERE WidgetInstId = 3726) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3727) END FROM WidgetInst WHERE WidgetInstId = 3727) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 3728) END FROM WidgetInst WHERE WidgetInstId = 3728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3723) END FROM WidgetInst WHERE WidgetInstId = 3723) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3724) END FROM WidgetInst WHERE WidgetInstId = 3724) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3725) END FROM WidgetInst WHERE WidgetInstId = 3725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3726) END FROM WidgetInst WHERE WidgetInstId = 3726) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3727) END FROM WidgetInst WHERE WidgetInstId = 3727) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 3728) END FROM WidgetInst WHERE WidgetInstId = 3728) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 3746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 7467) END FROM WidgetInst WHERE WidgetInstId = 7467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7468;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7467) END FROM WidgetInst WHERE WidgetInstId = 7467) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7494;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7500;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 7480) END FROM WidgetInst WHERE WidgetInstId = 7480) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7522;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 7482) END FROM WidgetInst WHERE WidgetInstId = 7482) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 7475) END FROM WidgetInst WHERE WidgetInstId = 7475) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 7559) END FROM WidgetInst WHERE WidgetInstId = 7559) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 7572) END FROM WidgetInst WHERE WidgetInstId = 7572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 7577) END FROM WidgetInst WHERE WidgetInstId = 7577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 7577) END FROM WidgetInst WHERE WidgetInstId = 7577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7569) END FROM WidgetInst WHERE WidgetInstId = 7569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7595;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7609;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7609;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7609;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7609;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7609;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7612) END FROM WidgetInst WHERE WidgetInstId = 7612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 2) END FROM WidgetInst WHERE WidgetInstId = 2) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7629) END FROM WidgetInst WHERE WidgetInstId = 7629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7629) END FROM WidgetInst WHERE WidgetInstId = 7629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7638) END FROM WidgetInst WHERE WidgetInstId = 7638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7638) END FROM WidgetInst WHERE WidgetInstId = 7638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7638) END FROM WidgetInst WHERE WidgetInstId = 7638) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7650) END FROM WidgetInst WHERE WidgetInstId = 7650)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7650) END FROM WidgetInst WHERE WidgetInstId = 7650)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7668) END FROM WidgetInst WHERE WidgetInstId = 7668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 7668) END FROM WidgetInst WHERE WidgetInstId = 7668) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 7652) END FROM WidgetInst WHERE WidgetInstId = 7652) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7713) END FROM WidgetInst WHERE WidgetInstId = 7713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7713) END FROM WidgetInst WHERE WidgetInstId = 7713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7713) END FROM WidgetInst WHERE WidgetInstId = 7713) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7729) END FROM WidgetInst WHERE WidgetInstId = 7729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7730;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7729) END FROM WidgetInst WHERE WidgetInstId = 7729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7729) END FROM WidgetInst WHERE WidgetInstId = 7729) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7749) END FROM WidgetInst WHERE WidgetInstId = 7749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7769) END FROM WidgetInst WHERE WidgetInstId = 7769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7769) END FROM WidgetInst WHERE WidgetInstId = 7769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7769) END FROM WidgetInst WHERE WidgetInstId = 7769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7775) END FROM WidgetInst WHERE WidgetInstId = 7775) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7769) END FROM WidgetInst WHERE WidgetInstId = 7769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7775) END FROM WidgetInst WHERE WidgetInstId = 7775) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7769) END FROM WidgetInst WHERE WidgetInstId = 7769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 7775) END FROM WidgetInst WHERE WidgetInstId = 7775) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 7769) END FROM WidgetInst WHERE WidgetInstId = 7769)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7784) END FROM WidgetInst WHERE WidgetInstId = 7784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7609) END FROM WidgetInst WHERE WidgetInstId = 7609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 7808) END FROM WidgetInst WHERE WidgetInstId = 7808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 7830) END FROM WidgetInst WHERE WidgetInstId = 7830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 147) END FROM WidgetInst WHERE WidgetInstId = 147) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 5) END FROM WidgetInst WHERE WidgetInstId = 5)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 7845) END FROM WidgetInst WHERE WidgetInstId = 7845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7846;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7860;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7860;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7860;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7860;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7860;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7860;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7861;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7861;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7861;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7861;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7861;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7861;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 7862;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 7862;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 7862;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 7862;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 7862;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 7862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7875) END FROM WidgetInst WHERE WidgetInstId = 7875) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7876) END FROM WidgetInst WHERE WidgetInstId = 7876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 7877) END FROM WidgetInst WHERE WidgetInstId = 7877) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7921;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7960) END FROM WidgetInst WHERE WidgetInstId = 7960) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7961) END FROM WidgetInst WHERE WidgetInstId = 7961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 7962) END FROM WidgetInst WHERE WidgetInstId = 7962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7960) END FROM WidgetInst WHERE WidgetInstId = 7960) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7961) END FROM WidgetInst WHERE WidgetInstId = 7961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 7962) END FROM WidgetInst WHERE WidgetInstId = 7962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 7997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8005) END FROM WidgetInst WHERE WidgetInstId = 8005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8006) END FROM WidgetInst WHERE WidgetInstId = 8006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8007) END FROM WidgetInst WHERE WidgetInstId = 8007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8005) END FROM WidgetInst WHERE WidgetInstId = 8005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8006) END FROM WidgetInst WHERE WidgetInstId = 8006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8007) END FROM WidgetInst WHERE WidgetInstId = 8007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8005) END FROM WidgetInst WHERE WidgetInstId = 8005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8006) END FROM WidgetInst WHERE WidgetInstId = 8006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8007) END FROM WidgetInst WHERE WidgetInstId = 8007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8065) END FROM WidgetInst WHERE WidgetInstId = 8065)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8066) END FROM WidgetInst WHERE WidgetInstId = 8066)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8067) END FROM WidgetInst WHERE WidgetInstId = 8067)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8065) END FROM WidgetInst WHERE WidgetInstId = 8065)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8066) END FROM WidgetInst WHERE WidgetInstId = 8066)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8067) END FROM WidgetInst WHERE WidgetInstId = 8067)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8155) END FROM WidgetInst WHERE WidgetInstId = 8155) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8156) END FROM WidgetInst WHERE WidgetInstId = 8156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8157) END FROM WidgetInst WHERE WidgetInstId = 8157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8155) END FROM WidgetInst WHERE WidgetInstId = 8155) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8156) END FROM WidgetInst WHERE WidgetInstId = 8156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8157) END FROM WidgetInst WHERE WidgetInstId = 8157) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8075) END FROM WidgetInst WHERE WidgetInstId = 8075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8076) END FROM WidgetInst WHERE WidgetInstId = 8076) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8077) END FROM WidgetInst WHERE WidgetInstId = 8077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8380) END FROM WidgetInst WHERE WidgetInstId = 8380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8381) END FROM WidgetInst WHERE WidgetInstId = 8381) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8382) END FROM WidgetInst WHERE WidgetInstId = 8382) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8380) END FROM WidgetInst WHERE WidgetInstId = 8380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8381) END FROM WidgetInst WHERE WidgetInstId = 8381) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8382) END FROM WidgetInst WHERE WidgetInstId = 8382) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8380) END FROM WidgetInst WHERE WidgetInstId = 8380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8381) END FROM WidgetInst WHERE WidgetInstId = 8381) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8382) END FROM WidgetInst WHERE WidgetInstId = 8382) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8460) END FROM WidgetInst WHERE WidgetInstId = 8460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8461) END FROM WidgetInst WHERE WidgetInstId = 8461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8462) END FROM WidgetInst WHERE WidgetInstId = 8462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8460) END FROM WidgetInst WHERE WidgetInstId = 8460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8461) END FROM WidgetInst WHERE WidgetInstId = 8461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8462) END FROM WidgetInst WHERE WidgetInstId = 8462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8477;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8460) END FROM WidgetInst WHERE WidgetInstId = 8460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8485;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8461) END FROM WidgetInst WHERE WidgetInstId = 8461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8462) END FROM WidgetInst WHERE WidgetInstId = 8462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8560) END FROM WidgetInst WHERE WidgetInstId = 8560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8561) END FROM WidgetInst WHERE WidgetInstId = 8561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8562) END FROM WidgetInst WHERE WidgetInstId = 8562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8560) END FROM WidgetInst WHERE WidgetInstId = 8560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8561) END FROM WidgetInst WHERE WidgetInstId = 8561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8562) END FROM WidgetInst WHERE WidgetInstId = 8562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8560) END FROM WidgetInst WHERE WidgetInstId = 8560) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8561) END FROM WidgetInst WHERE WidgetInstId = 8561) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8562) END FROM WidgetInst WHERE WidgetInstId = 8562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8660) END FROM WidgetInst WHERE WidgetInstId = 8660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8661) END FROM WidgetInst WHERE WidgetInstId = 8661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8660) END FROM WidgetInst WHERE WidgetInstId = 8660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8661) END FROM WidgetInst WHERE WidgetInstId = 8661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8660) END FROM WidgetInst WHERE WidgetInstId = 8660) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8661) END FROM WidgetInst WHERE WidgetInstId = 8661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8690) END FROM WidgetInst WHERE WidgetInstId = 8690) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8660) END FROM WidgetInst WHERE WidgetInstId = 8660)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8661) END FROM WidgetInst WHERE WidgetInstId = 8661)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8690) END FROM WidgetInst WHERE WidgetInstId = 8690) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8660) END FROM WidgetInst WHERE WidgetInstId = 8660)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8705;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8661) END FROM WidgetInst WHERE WidgetInstId = 8661)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8690) END FROM WidgetInst WHERE WidgetInstId = 8690) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8660) END FROM WidgetInst WHERE WidgetInstId = 8660)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8691) END FROM WidgetInst WHERE WidgetInstId = 8691) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8661) END FROM WidgetInst WHERE WidgetInstId = 8661)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8692) END FROM WidgetInst WHERE WidgetInstId = 8692) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8662) END FROM WidgetInst WHERE WidgetInstId = 8662)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8727;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8735) END FROM WidgetInst WHERE WidgetInstId = 8735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8736) END FROM WidgetInst WHERE WidgetInstId = 8736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8737) END FROM WidgetInst WHERE WidgetInstId = 8737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8735) END FROM WidgetInst WHERE WidgetInstId = 8735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8736) END FROM WidgetInst WHERE WidgetInstId = 8736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8737) END FROM WidgetInst WHERE WidgetInstId = 8737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8735) END FROM WidgetInst WHERE WidgetInstId = 8735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8736) END FROM WidgetInst WHERE WidgetInstId = 8736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8737) END FROM WidgetInst WHERE WidgetInstId = 8737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8735) END FROM WidgetInst WHERE WidgetInstId = 8735) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8736) END FROM WidgetInst WHERE WidgetInstId = 8736) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8737) END FROM WidgetInst WHERE WidgetInstId = 8737) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8857) END FROM WidgetInst WHERE WidgetInstId = 8857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8857) END FROM WidgetInst WHERE WidgetInstId = 8857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8857) END FROM WidgetInst WHERE WidgetInstId = 8857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8855) END FROM WidgetInst WHERE WidgetInstId = 8855) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8856) END FROM WidgetInst WHERE WidgetInstId = 8856) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8857) END FROM WidgetInst WHERE WidgetInstId = 8857) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8965) END FROM WidgetInst WHERE WidgetInstId = 8965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8966) END FROM WidgetInst WHERE WidgetInstId = 8966) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8965) END FROM WidgetInst WHERE WidgetInstId = 8965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8966) END FROM WidgetInst WHERE WidgetInstId = 8966) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8965) END FROM WidgetInst WHERE WidgetInstId = 8965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8966) END FROM WidgetInst WHERE WidgetInstId = 8966) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8965) END FROM WidgetInst WHERE WidgetInstId = 8965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8966) END FROM WidgetInst WHERE WidgetInstId = 8966) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8965) END FROM WidgetInst WHERE WidgetInstId = 8965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8966) END FROM WidgetInst WHERE WidgetInstId = 8966) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8965) END FROM WidgetInst WHERE WidgetInstId = 8965) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8966) END FROM WidgetInst WHERE WidgetInstId = 8966) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8967) END FROM WidgetInst WHERE WidgetInstId = 8967) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7860) END FROM WidgetInst WHERE WidgetInstId = 7860) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7467) END FROM WidgetInst WHERE WidgetInstId = 7467)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7861) END FROM WidgetInst WHERE WidgetInstId = 7861) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7467) END FROM WidgetInst WHERE WidgetInstId = 7467)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 7862) END FROM WidgetInst WHERE WidgetInstId = 7862) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7467) END FROM WidgetInst WHERE WidgetInstId = 7467)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9040) END FROM WidgetInst WHERE WidgetInstId = 9040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9041) END FROM WidgetInst WHERE WidgetInstId = 9041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9042) END FROM WidgetInst WHERE WidgetInstId = 9042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9047;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9055;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9055;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9055;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9055;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9055;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = 98)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9058) END FROM WidgetInst WHERE WidgetInstId = 9058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 7464) END FROM WidgetInst WHERE WidgetInstId = 7464) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9075) END FROM WidgetInst WHERE WidgetInstId = 9075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9075) END FROM WidgetInst WHERE WidgetInstId = 9075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9084) END FROM WidgetInst WHERE WidgetInstId = 9084) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9084) END FROM WidgetInst WHERE WidgetInstId = 9084) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9084) END FROM WidgetInst WHERE WidgetInstId = 9084) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9096) END FROM WidgetInst WHERE WidgetInstId = 9096)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9099;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9102;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9096) END FROM WidgetInst WHERE WidgetInstId = 9096)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9114) END FROM WidgetInst WHERE WidgetInstId = 9114) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9098) END FROM WidgetInst WHERE WidgetInstId = 9098) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9159) END FROM WidgetInst WHERE WidgetInstId = 9159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9159) END FROM WidgetInst WHERE WidgetInstId = 9159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9159) END FROM WidgetInst WHERE WidgetInstId = 9159) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9175) END FROM WidgetInst WHERE WidgetInstId = 9175) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9175) END FROM WidgetInst WHERE WidgetInstId = 9175) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9175) END FROM WidgetInst WHERE WidgetInstId = 9175) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9195) END FROM WidgetInst WHERE WidgetInstId = 9195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9195) END FROM WidgetInst WHERE WidgetInstId = 9195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9195) END FROM WidgetInst WHERE WidgetInstId = 9195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9215) END FROM WidgetInst WHERE WidgetInstId = 9215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9215) END FROM WidgetInst WHERE WidgetInstId = 9215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9215) END FROM WidgetInst WHERE WidgetInstId = 9215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9221) END FROM WidgetInst WHERE WidgetInstId = 9221) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9215) END FROM WidgetInst WHERE WidgetInstId = 9215)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9222;


